[ToC] [Up] [Back] [Next] ... [Book Plug] The Information Commons
.................... Introduction to HTML

7.1 CENTER Element

Netscape introduced the CENTER element to permit center alignment of block of text, figures, etc. They did this because there was a bug in several other browsers such that expressions like <P ALIGN="center"> broke the browser. This is now fixed, so that you should use ALIGN to center align text wherever possible.

7.1.1 Particularly Useful Uses

CENTER does not introduce vertical spacing, so you can use this tag to center text between two closely spaced HRs. You can also use CENTER to center TABLEs -- in fact, this is currently the only way you can do so.

7.1.2 Example of CENTER

  <CENTER>
     here is some centered text.....
     <P> HEre is another centered paragraph.
     <P> And yet another.
     <table border> <tr> <td> and here is a single-celled table! </td>
     </tr> </table>
  
which is displayed as:
here is some centered text.....

HEre is another centered paragraph.

And yet another.
and here is a single-celled table!


[ToC] [Up] [Back] [Next] .................... Introduction to HTML

© Ian Graham 1994-1995 Page Last Updated: 4 December 1995